package com.lc.afbx.activity;

import android.content.Intent;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.lc.afbx.R;
import com.lc.afbx.conn.Conn;

import cn.trinea.android.common.util.ToastUtils;


/**
 * Created by Administrator on 2016/5/19.
 */
public class QueryViolationActivity extends BaseActivity implements View.OnClickListener {

    private WebView webView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shouye_weizhangchaxun_web);

        webView = ((WebView) findViewById(R.id.web_searchCar));

        DisplayMetrics metric = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(metric);
        int height = metric.heightPixels;  // 屏幕宽度（像素）

        LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) webView.getLayoutParams();

        layoutParams.height = height;

        webView.setLayoutParams(layoutParams);


        webView.getSettings().setJavaScriptEnabled(true);
        webView.setWebChromeClient(new WebChromeClient());
        webView.setWebViewClient(new WebViewClient());
        webView.loadUrl(Conn.INLET_API_SET_VIOLATION);

        webView.setVerticalScrollBarEnabled(false);

    }



    @Override
    public void onClick(View view) {


        switch (view.getId()) {

            case R.id.back:
                finish();
                return;

        }


    }


}
